
package GUI;

import Arbori.*;

public class Completare{
    private ArboreFunctional a = null;
    private javax.swing.JTextField fd;
    private javax.swing.JTextField fdx0;
    private javax.swing.JTextField fx0;
    private double xz;

    public Completare(ArboreFunctional a,javax.swing.JTextField fx0,javax.swing.JTextField fd,javax.swing.JTextField fdx0,double xz){
        this.fdx0 = fdx0;
        this.fd = fd;
        this.fx0 = fx0;
        this.a = a;
        this.xz = xz;
    }

    public void completare(){
        a.getRadacina().setX(xz);
        Command cf = new CalculField(a,fx0);
        cf.execute();
        Command df = new DerivareField(a,fd);
        df.execute();
        Command dcf = new DerivareCalculField(a,fdx0);
        dcf.execute();
    }

}
